-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix legacy long aggregations #523
Conversation
f7ab49a
to
d2419ac
Compare
@@ -111,15 +112,17 @@ export type GroupByFromType<T, N extends string> = NonNullable<T> extends number | |||
: T extends Array<infer U> ? GroupByFromType<U, N> | |||
: never; | |||
|
|||
export type AggregationFromType<T> = NonNullable<T> extends number | |||
export type AggregationFromType<T> = NonNullable<T> extends StringLong |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main change that adds numerical aggregation support back to long-type properties
|
||
declare const representsLong: unique symbol; | ||
|
||
export type StringLong = string & { [representsLong]: true }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used a tagged type to disambiguate between string-type properties and strings that represent long-type properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we leave a comment in the code here to explain this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with one comment
Fixes #324 |
No description provided.